//手写节流
function throttle(fn, await) {
    let startTime = 0
    return function () {
        const nowTime = new Date().getTime()
        // console.log(nowTime);
        const waitTime = await - (nowTime - startTime)
        if (waitTime <= 0) {
            fn.apply(this)
            startTime = nowTime
        }
    }
}